import Axios from 'axios';
import config from '@/config/config';

export const baseUrl = config.baseUrl.apiUrl;

let axios = Axios.create({
    baseURL: baseUrl,
    timeout: 30000,
    headers: {
        'Content-Type': 'application/json; charset=utf-8'
    }
});

export const postAxios = (url, data) => {
    return axios.post(url, data);
};

export const getAxios = (url, data) => {
    return axios.get(url, {
        params: data
    });
};